home *** CD-ROM | disk | FTP | other *** search
- ; $VER: UQWK_SOUP.script 2.0 (29.9.94)
- ; UQWK_SOUP script for THOR and NComm
- ; Author: Petter Nilsen, Ultima Thule Software
- ;
- ; Expects the supplied GRAB unix script in the path on the
- ; remote machine.
- ;
- ; Will not delete the #?.out file after upload, this must be done
- ; with the requester that pops up when entering the BBS in THOR again
- ; before parsing.
- ;
-
- REQUEST OFF
-
- ; If you do not supply a login name here, the script will use the
- ; user name from the NComm phonebook.
- ;
- set $loginname = "pettern\n" ; login name, don't forget the "\n"
- set $shellprompt = "lightning:~>" ; shell prompt on you unix system, change to fit
-
- cli $THORPath"bin/ScriptServ \""$BBSName"\" WRITECFG EV 0 EV 1"
-
- varfile "t:"$BBSName".CONFIG"
-
- readvar $CfgVer
- readvar $BBSID
- readvar $BBSType
- readvar $Path
- readvar $PostConf
- readvar $UpLoadDir
- readvar $UserName
- readvar $UserStreet
- readvar $UserAddress
- readvar $UserCountry
- readvar $UserPhone
- readvar $NewFiles
- readvar $AutoPDnl
- readvar $AutoLogoff
- readvar $UseColors
- varfile close
-
- if !$CfgVer == "4" then message "Incompatible version of ScriptServ"
- if !$CfgVer == "4" then goto AllDone
-
- cli "delete >nil: \"t:"$BBSName".CONFIG\""
-
- when "\r\nNO CARRIER\r\n" goto AllDone
- ; when "Login incorrect" goto Login
-
- autoxfer off ; Turn off G&R commands
- autoup off ; Turn off Zmodem autoupload
- autodown on ; Turn on Zmodem autodownload
-
- menuselect TRANSLATE 1 0 ; Use ISO character set
-
- ;
- ;***************** Login sequence
- ;
- Login:
- converse "login:" $loginname
- converse "Password:" "\p\n"
- ;
- ;***************** Do UQWK_SOUP packet handling
- ;
- wait $shellprompt
- send "\n"
-
- eventLoop:
- set $done = "FALSE"
-
- if !exists "t:"$BBSName".EVENTS" then goto HandleSOUP
- varfile "t:"$BBSName".EVENTS"
-
- readvar $eventnr
- readvar $event
-
- if $eventnr == "EOF" then goto evLoopEnd
- if $event == "EOF" then goto evLoopEnd
-
- if $event == "12" then gosub AutoLogOff
-
- if $event == "7769" then set $done = "TRUE"
-
- if $done == "TRUE" then cli "run >nil: "$THORPath"bin/ScriptServ \""$BBSName"\" DONE "$eventnr
- if !$done == "TRUE" then cli "run >nil: "$THORPath"bin/ScriptServ \""$BBSName"\" ERROR "$eventnr
-
- goto eventLoop
-
- evLoopEnd:
- varfile close
-
- HandleSOUP:
-
- if exists $UpLoadDir$BBSID".out" then set $docmd = "grab -u\n"
- if !exists $UpLoadDir$BBSID".out" then set $docmd = "grab -u -r\n"
-
- gosub DoCommand
-
- when "B01" upload $UpLoadDir$BBSID".out",Z
-
- send "\n\n"
-
- wait $shellprompt
- cli "run >nil: sys:rexxc/rx 'address THOR.01 RESCAN'"
- dlwhen
- goto AllDone
-
- ;************************************************
- DoCommand:
- converse $shellprompt $docmd
- return
-
- ;************************************************
- ; Set the autologoff flag.
- ; Uses variables:
- ; $boolean - Logoff (y/n)
- AutoLogOff:
- readvar $boolean
-
- set $AutoLogoff = "y"
- if $boolean == "0" then set $AutoLogoff = "n"
- set $done = "TRUE"
-
- return
-
- ;************************************************
- AllDone:
- if $AutoLogoff == "n" then goto NoLogOut
- gosub DoLogOut
-
- NoLogOut:
- request on
- end
-
- DoLogOut:
- set $docmd = "logout\n"
- gosub DoCommand
-
-